package com.dubito.dose.data.mapper

import com.dubito.dose.data.entity.MedicationEntity
import com.dubito.dose.domain.model.Medication

/**
 * author: LiLiang
 * createTime: 2022/9/5-13:33
 * remark:
 **/

fun MedicationEntity.toMedication(): Medication {

    return Medication(
        name = name,
        dosage = dosage,
        recurrence = recurrence,
        endDate = endDate,
        timesOfDay = timeOfDay
    )
}

fun Medication.toMedicationEntity(): MedicationEntity {
    return MedicationEntity(
        name = name,
        dosage = dosage,
        recurrence = recurrence,
        endDate = endDate,
        timeOfDay = timesOfDay
    )
}